<!-- <template>
  <div id="app">
    <div v-if="!isLoginPage">
      <button @click="goToBilibili">点击跳转B站</button>
      <h1>你好：</h1>
      <button @click="Numcount">点击+1：{{ count }}</button>
      <button @click="gotoLogin">登录页面</button>
    </div>
    <router-view v-else></router-view>
  </div>
</template>

<script>
export default {
  data() {
    return {
      count: 0,
      isLoginPage: false,
    };
  },
  methods: {
    Numcount() {
      this.count++;
    },
    goToBilibili() {
      window.open("http://www.bilibili.com");
    },
    gotoLogin() {
      this.isLoginPage = true;
      this.$router.push("/UserLogin"); // 使用路由路径
    },
  },
};
</script> -->
<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "App",
};
</script>